package name.matthewgreet.example6.view; import name.matthewgreet.example6.dto.UserRatingDTO; import name.matthewgreet.example6.util.Example6FormatLibrary; import name.matthewgreet.strutscommons.util.FormatLibrary; public class UserRatingDisplay { private UserRatingDTO record; private String rating; private String ratingBand; private String recordDate; private String username; public UserRatingDisplay(UserRatingDTO userRating) { this.record = userRating; rating = Example6FormatLibrary.formatRating(userRating.getRating()); ratingBand = FormatLibrary.formatNumber(userRating.getRating().intValue()); recordDate = FormatLibrary.formatDateLongYear(userRating.getRecordDate()); username = userRating.getUser().getName(); } public UserRatingDTO getRecord() { return record; } public String getRating() { return rating; } public String getRatingBand() { return ratingBand; } public String getRecordDate() { return recordDate; } public String getUsername() { return username; } }